|
|
Joined: Mar 2000
Posts: 21,080 Likes: 3
I type like Navaho
|
|
I type like Navaho
Joined: Mar 2000
Posts: 21,080 Likes: 3 |
How would I go about optimizing this: https://www.ubbdev.com/db/uploads/pagination_621.txt If you have time can you tell me the principals behind making the changes?
|
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
I'm not sure what can be done to speed it up... the best thing to do is just tinker with it as much as you can, trying different ideas, etc... Check out the Benchmark module: http://www.perldoc.com/perl5.6.1/lib/Benchmark.html
UBB.classic: Love it or hate it, it was mine.
|
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
CC - out of curiousity, if you know O() notation, have you ever found it usefull with perl?
|
|
|
|
|
Joined: Aug 2000
Posts: 335
Member
|
|
Member
Joined: Aug 2000
Posts: 335 |
It's hard to read due to the inconsistent indentation, but it looks like a lot of common expressions could be moved outside of the loops.
Also, according to Programming Perl (3rd Ed., chap 24), using join is more efficient than a series of string concatenations.
|
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
|
P.I.T.A. / Programmer
Joined: Sep 2000
Posts: 755 |
quote: Originally posted by jordo: CC - out of curiousity, if you know O() notation, have you ever found it usefull with perl?
O notation is essentially a way of representing execution times/speeds for an algorithm. An algorithm can be represented in any languague [in some more effectivly than others], thus it's completely independant of relating it to perl, C, Java, etc. In other words, it's always useful when you're dealing with algorithms
--mark
"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
|
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
yeah i know i was just curious whether they use it when developing ubb or whether the use Benchmark modules more heavily. 
|
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
We don't use it unless we're not getting acceptable performance...
UBB.classic: Love it or hate it, it was mine.
|
|
|
|
|
Joined: Dec 2001
Posts: 51
Member
|
|
Member
Joined: Dec 2001
Posts: 51 |
Split the variables earlier?
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 253
Joined: January 2000
|
|
|
Forums63
Topics37,583
Posts293,955
Members13,824
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 462
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 12
|
|
|
|